<template>
<div class="header">
  <div class="header-left" >
    <div class="iconfont back-icon">&#xe658;</div>
  </div>
  <div class="header-input">
     <span class="iconfont" style="margin-left: 10px">&#xe63c;</span>
     输入城市景点/游玩/主题
  </div>
  <router-link to='/city'>
    <div class="header-right">
      <span class="city">{{this.city}}</span>
      <span class="iconfont" style="margin-left: 5px">&#xe6aa;</span>
    </div>
  </router-link>
</div>
</template>

<script type="text/javascript">
import {mapState} from 'vuex'
export default{
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}

</script>

<style type="text/css" lang="stylus">
@import '~styles/varibles.styl'
  .header
    display:flex
    line-height:$headerHeight
    background:$bgColor
    color:#fff
    .header-left
      width:.64rem
      float:left
      .back-icon
        position: absolute
        top: 0
        left: 0
        width: .9rem
        text-align: center
        font-size: .8rem
    .header-input
      touch-action: none;
      flex:1
      background:#fff
      border-radius:.1rem
      margin-top:.12rem
      margin-bottom:.12rem
      margin-left:.24rem
      height:.64rem
      line-height:.64rem
      color:#ccc
    .header-right
      min-width: 1.24rem
      padding: 0 .1rem
      text-align:center
      color:#fff
      .city
        width:100%
</style>
